{extend name="public/base" /}
{block name="main-content"}
<div class="page-content">
	<!--主题-->
	<div class="page-header">
		<h1>
			您当前操作
			<small>
				<i class="ace-icon fa fa-angle-double-right"></i>
				编辑{$menu.menu_name}
			</small>
		</h1>
	</div>
	<div class="row">
		<div class="col-xs-12">
			<form class="form-horizontal ajaxForm2" name="runnews_menuedit" method="post" action="{:url('news_menu_runedit')}">
				<input type="hidden" name="id" value="{$menu.id}" />
				<input type="hidden" name="lang_list" value="{$menu.menu_l}" />
				<input type="hidden" name="parentid" value="{$menu.parentid}" />






				<div class="form-group" id="menu_content">
					<label class="col-sm-3 control-label no-padding-right" for="form-field-1"> 内容：</label>
					<div class="col-sm-9">
						<script src="__PUBLIC__/ueditor/ueditor.config.js" type="text/javascript"></script>
						<script src="__PUBLIC__/ueditor/ueditor.all.js" type="text/javascript"></script>
						<textarea name="menu_content" rows="100%" style="width:100%" id="myEditor">{$menu.menu_content}</textarea>
						<script type="text/javascript">
							var editor = new UE.ui.Editor();
							editor.render("myEditor");
						</script>
					</div>
				</div>




				<div class="clearfix form-actions">
					<div class="col-md-offset-3 col-md-9">
						<button class="btn btn-info" type="submit">
							<i class="ace-icon fa fa-check bigger-110"></i>
							保存
						</button>

						&nbsp; &nbsp; &nbsp;
						<button class="btn" type="reset">
							<i class="ace-icon fa fa-undo bigger-110"></i>
							重置
						</button>
					</div>
				</div>
			</form>
		</div>
	</div>

</div><!-- /.page-content -->
{/block}
{block name="scripts"}
<script>
	checkType();
	function checkType(){
		var $type=$("input[name='menu_type'][checked]").val();
		if($type==2){
			$('#address').show();
			$('#menu_content,#pic_list,#listtpl,#newstpl,#model').hide();
		}else if($type==1){
			$('#address,#menu_content,#pic_list,#model').hide();
			$('#listtpl,#newstpl').show();
		}else if($type==3){
			$('#address,#menu_content,#pic_list').hide();
			$('#listtpl,#newstpl,#model').show();
		}else{
			$('#address,#newstpl,#model').hide();
			$('#menu_content,#listtpl,#pic_list').show();
		}
	}
	$('#type2').click(function(){
		$('#address').show();
		$("input[name='menu_type'][checked]").attr("checked",false);
		$('#type2').attr("checked",true);
		checkType();
	});
	$('#type1,#type3,#type4').click(function(){
		$('#address').hide();
		$("input[name='menu_type'][checked]").attr("checked",false);
		$(this).attr("checked",true);
		checkType();
	});
</script>
{/block}
